CANopen Scaling
Scaling of position, velocity, and acceleration values are calculated differently depending on the setting of CANOPEN.WORKBENCHUNITS. When this is set to 0 (default), the CANopen scaling factors are used as described below. When set to 1, the units defined by AXIS#.UNIT.* keywords (AXIS#.UNIT.PROTARY , AXIS#.UNIT.VROTARY , etc.) will be used. The scale factors selected will be applied to all CANopen objects including manufacturer specific and drive profile objects.
-
- For ease of use, it is recommended to leave CANOPEN.WORKBENCHUNITS at 0 to use CANopen scaling. When set to 1, the values returned by fieldbus objects may or may not be scaled 1000:1 to improve resolution. See CANopen Object Table for which values are scaled 1:1 vs 1000:1 in WorkBench.
This topic has the following sections:
- Scaling and Various Objects
- Calculator for AKD2G CANopen Scaling Parameters
- CANopen Scaling Examples
Scaling and Various Objects
CANopen Position Scaling using 6091h/6092h
Figure 1: CANopen position scaling concept diagram
The calculation of the position values is done by the following formula:
The position internal value is given in internal units (encoder increments). For calculation of the position internal values from the target position values, the formula is transposed to:
To simplify the conversion, one can leave gear ratio (0x6091S1 and 0x6091S2) and feed constant revolutions (0x6092S2) set to 1 and only modify the feed (0x6092S1) as number of units per revolution desired:
If units in degrees are desired, set feed (0x6092S1) to 360 units per revolution.
6091h – Gear Ratio
This object defines the number of motor shaft revolutions per driving shaft revolution. The gear ratio is calculated by the following formula:
Index | Sub-Index | Data Type | ||
---|---|---|---|---|
6091h, 6891h Gear ratio - AxisX | 0 | Unsigned8 | Highest sub-index supported (always 3) | |
1 | Unsigned32 | Motor revolutions - Axis 1 | AXIS#.CANOPEN.GEARPRIMARY.MOTORREV | |
2 | Unsigned32 | Shaft revolutions - Axis 1 | AXIS#.CANOPEN.GEARPRIMARY.SHAFTREV |
6092h – Feed Constant
This object defines the ratio of feed in position units per driving shaft revolutions. The feed constant is calculated by the following formula:
Index | Sub-Index | Data Type | ||
---|---|---|---|---|
6092h, 6892h Feed constant - AxisX | 0 | Unsigned8 | Highest sub-index supported (always 3) | |
1 | Unsigned32 | Feed - Axis 1 | AXIS#.CANOPEN.FCPRIMARY.FEED | |
2 | Unsigned32 | Shaft revolutions - Axis 1 | AXIS#.CANOPEN.FCPRIMARY.SHAFTREV |
Position Counts (actual position internal 6063h)
Position encoder resolution used in the above calculations is always 2^32 counts/revolution for the internal AKD2G position values regardless of the actual feedback resolution. When reading certain CANopen values that are given in internal units, use AXIS#.CANOPEN.PSCALE to control the resolution of the user value. The value presented via CANopen is shifted by the number of bits specified by the PSCALE parameter.
Value = (CANopen value) / 2^(AXIS#.CANOPEN.PSCALE)
CANopen Velocity Scaling Using 6096h
All velocity values over CANopen use the scaling defined by object 6096h, 6896h Velocity factor - AxisX, velocity factor. Velocity values are presented as position units/s where position units are defined by the objects above (6091h, 6891h Gear ratio - AxisX/6092h, 6892h Feed constant - AxisX).
or:
Index | Sub-Index | Data Type | |
---|---|---|---|
6096h, 6896h Velocity factor - AxisX | 0 | Unsigned8 | Highest sub-index supported (always 3) |
1 | Unassigned32 | Velocity Factor Numerator - Axis 1 | |
2 | Unassigned32 | Velocity Factor Denominator - Axis 1 |
-
- To get a velocity in revolutions per second, make the denominator equal counts per rev and to get revolutions per minute, also set numerator to seconds in a minute.
CANopen Acceleration Scaling Using 6097h
All acceleration values over CANopen use the scaling factor defined by object 6097h, 6897h Acceleration factor - AxisX, acceleration factor. Acceleration values are presented as velocity units/s, where velocity units are defined by the objects above (6091h, 6891h Gear ratio - AxisX/6092h, 6892h Feed constant - AxisX/6096h, 6896h Velocity factor - AxisX).
Index | Sub-Index | Data Type | ||
---|---|---|---|---|
6097h, 6897h Acceleration factor - AxisX | 1 | Unsigned32 | Acceleration Factor Numerator – Axis 1 | AXIS#.CANOPEN.ACCSCALENUM |
2 | Unsigned32 | Acceleration Factor Denominator – Axis 1 | AXIS#.CANOPEN.ACCSCALEDENOM |
Calculator for AKD2G CANopen Scaling Parameters
The calculator below can be used to calculate the CANopen Scaling Parameters for AKD2G axes.
Gear Ratio:
Motor Revolutions:
Shaft Revolutions:
Feed Constant:
Feed Units / Shaft
Velocity Units:
Velocity Units:
CANopen Scaling Examples
CANOPEN.WORKBENCHUNITS = 0 (default, recommended setting)
Position units in default 2^16 counts/rev. Velocity units in default counts/s.
0x6091S1 = 1 (motor revolutions)
0x6091S2 = 1 (shaft revolutions)
0x6092S1 = 65536 (feed)
0x6092S2 = 1 (shaft revolutions)
0x6096S1 = 1 (velocity factor numerator)
0x6096S2 = 1 (velocity factor denominator)
To give a target position of 180 degrees, one would command object 607Ah, 687Ah Target position - AxisX to 32768 counts:
CAN user value = (2^16 counts/rev / 360 deg/revolution) * desired position -> 182.0444 counts/deg * 180 deg = 32768 counts
To give a target velocity of 100 rpm, command object 60FFh, 68FFh Target velocity - AxisX to 109227 counts/s. The desired RPM is first converted into RPS to match the per second nature of CANopen velocity units and then multiplied by the number of counts per rev to give the counts per second value needed.
CAN user value = (100 rpm / 60 sec/m) * 65536 counts/revolution = 1.6667 rps * 65536 counts/rev = 109266.6667
Position units in 1000*deg. Velocity units in rpm.
0x6091S1 = 1 (motor revolutions)
0x6091S2 = 1 (shaft revolutions)
0x6092S1 = 36000 (feed) – 360 deg * 1000 to get some extra resolution
0x6092S2 = 1 (shaft revolutions)
0x6096S1 = 60 (velocity factor numerator) – seconds in a minute to convert counts per second to counts per minute
0x6096S2 = 36000 (velocity factor denominator) – counts per rev to convert counts per second to revolutions per second
To give a target position of 180 degrees, command object 607Ah, 687Ah Target position - AxisX to 18000:
CAN user value = (36000 counts/revolution / 360 deg/rev) * desired position -> 100 counts/deg * 180 deg = 18000 counts
To give a target velocity of 100 rpm, command object 60FFh, 68FFh Target velocity - AxisX to 100 rpm. The desired RPM is first converted into RPS to match the per second nature of CANopen velocity units and then multiplied by the number of counts per rev to give the counts per second value needed. Then apply the velocity factor to the counts per second value which gives the RPM.
CAN user value = (100 rpm / 60 sec/m) * 36000 counts/revolution * velocity factor = 1.6667 rps * 36000 counts/revolution * 60/36000 = 100rpm
CANOPEN.WORKBENCHUNITS = 1 (legacy, not recommended)
Position in degrees (note the loss in resolution by using this method with only a full degree worth of resolution available). Velocity in rpm.
CANopen scaling objects ignored
UNIT.PROTARY = degrees
UNIT.VROTARY = rpm
To give a target position of 180 degrees, command object 607Ah, 687Ah Target position - AxisX to 180.
To give a target velocity of 100rpm, command object 60FFh, 68FFh Target velocity - AxisX to 100.